<?php
require_once('inc/init.php');
require_once('inc/editor/ubb.php');
require_once getCacheFilePath('forums.php');
require_once getCacheFilePath('stamps.php');
$postid=numFilter($_GET['postid']);
$tid=numFilter($_GET['tid']);
$istopic=numFilter($_GET['istopic']);
$action=strFilter($_GET["action"]);
$action=empty($action)? "view" : $action;
$topic=$db->row_select_one("topics","id={$tid}","id,fid,title");
if(empty($tid)){
	$post=$db->row_select_one("posts","id={$postid}","id,fid,title");
}else{
	$post=$db->row_select_one("topics","id={$tid}","id,fid,title,highlight");
}

$post['title']=htmlFilter($post['title']);
//$post['content']=$ubb->ubb2html($post['content']);
require_once getTemplatePath('postmanager.htm');
?>